//
//  TouchImage.m
//  Photograph
//
//  Created by dllo on 16/6/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "TouchImage.h"
#import "PhotViewController.h"

@implementation TouchImage

-(instancetype)initWithImage:(UIImage *)image withFrame:(CGRect)frame{
    self = [super initWithImage:image];
    if(self){
        self.userInteractionEnabled = YES;
        self.frame = frame;
        [self addTap];
    }
    return  self;
}
-(void)addTap{
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAction:)];
    [self addGestureRecognizer:tap];
    [tap release];
    
    
    
}
-(void)tapAction:(UITapGestureRecognizer*)tap{
    [self.delegate next:self];
}

@end
